/*Copyright (C) 2009 - 2011 MASSART GAUTHIER

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "../headers.h"

#define TAILLE_MAX 1000

void tet_menu(void) {

	long choix_menu = 0, score = 0;
	char *contenu_menu = "Jouer\n"
											 "Manuel\n"
											 "Voir les scores\n"
											 "Revenir au menu principal\n";
	char *contenu_titre = "MENU DU TETRIS";

	while(choix_menu < 4) {
		clear();
		choix_menu = afficher_menu_jeu(contenu_menu, contenu_titre);

		if(choix_menu == 1) {
			tet_jeu();
		}
		else if(choix_menu == 2) {
			tet_man();
		}
		else if(choix_menu == 3) {

			score = lire_suppr_score("Tetris", true);

			if(score != -1) {
				clear();
				afficher_titre("SCORES DU TETRIS");
				CSLP_ColorText(CT);
				printw("\n Votre meilleur score est : %ld\n", score);
				getch();
			}
		}
		else if(choix_menu == 4) {
			clear();
		}
	}
}
